﻿using RpcModel;
using RpcSync.Collect.Model;
using RpcSync.Service.Interface;

namespace RpcSync.Service.Event
{
    internal class RpcBroadcastEvent : RpcClient.Interface.IRpcApiService
    {
        private IBroadcastService _Broadcast;
        public RpcBroadcastEvent(IBroadcastService broadcast)
        {
            this._Broadcast = broadcast;
        }


        /// <summary>
        /// 广播消息
        /// </summary>
        /// <param name="msg">消息</param>
        /// <param name="source">数据源</param>
        public void Broadcast(BroadcastMsg msg, MsgSource source)
        {
            this._Broadcast.Send(msg,source);
        }

    }
}
